import type { ReactNode } from 'react';
import React from 'react';
import { Button, Space } from 'antd';

type PropsType = Record<string, any>;

const ButtonStep: React.FC<PropsType> = (props) => {
  const change = (val: string | ReactNode) => {
    props.changeItem(val);
  };
  return (
    <Space wrap>
      <Button
        type="primary"
        onClick={() => {
          change(props.children);
        }}
      >
        {props.children}
      </Button>
    </Space>
  );
};

export default ButtonStep;
